﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>lhgdialog - 传值测试</title>
<link type="text/css" href="../lhgdialog.css" rel="stylesheet"/>
<script type="text/javascript" src="../lhgcore.min.js"></script>
<script type="text/javascript" src="../lhgdialog.js"></script>
<script type="text/javascript">
J(function(){
	
	var bwin = J('#ab').dialog({
	    id: 'b', 
		page: '05.html' ,
		width: 350, 
		height: 350
	});
	
    J('#a2').click(function(){
            alert(J('#b1',bwin.inwin.document).val());
    });
    
	J('#a3').click(function(){
			bwin.inwin.bb();
    });
	
	J('#a4').click(function(){
			bwin.cancel();
    });
	
	J('#a5').click(function(){
	    alert( J('#c1',bwin.inwin.cwin.inwin.document).val() );
	});
	
	J('#a6').click(function(){
	    bwin.inwin.cwin.inwin.cc();
	});
	
	J('#a7').click(function(){
	    bwin.inwin.cwin.cancel();
	});
    
});
  
function aa(){
    alert("a页面的函数");
}
</script>
</head>
<body>

<div style="padding:50px;">
<p>a页面</p>
b窗口为a页面的子窗口<br />
<input id="ab" type="button" value="打开b窗口"/><br />
<input id="a1" size="40" type="text" value="a页面的文本框"/><br/>
<input id="a2" type="button" value="调用b窗口的文本框的值"/><br />
<input id="a3" type="button" value="调用b窗口的函数"/><br />
<input id="a4" type="button" value="关闭b窗口"/><br />
<hr />
C窗口为B窗口的子窗口<br />
<input id="a5" type="button" value="调用c窗口的文本框的值"/><br />
<input id="a6" type="button" value="调用c窗口的函数"/><br />
<input id="a7" type="button" value="关闭c窗口"/><br />
</div>

</body>
</html>